﻿@using E5_KhuyenMaiVang.Models;
@{
    if(Session["CityID"] == null){
        Session["CityID"] = 0;
    }
    int SelectedCityID = (int)Session["CityID"];
    GoldDealEntities db = new GoldDealEntities();
    List<CITY> cities = db.CITY.ToList(); 
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery-ui-1.8.20.custom.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
     <script src="@Url.Content("~/Scripts/countdownpro.js")" type="text/javascript"></script>
     <script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.custom.min.js")" type="text/javascript"></script>
     <style type="text/css">
         
   #floater {
            background: #F3F3F3;
            height: 18px;
            width: 100%;
            position: fixed;
            top: 0px;
            z-index: 5;
            border-bottom: 2px solid #FFF;
        }

#floater a{
	text-decoration:none; font-family:Arial, Helvetica, sans-serif ;font-size:12px; font-weight:bold; color:#000;display:block;
	}
#floater a:hover{
	color:#FFF;
}

#floater td:hover{
	background-color:#999;
	}
tr.namecolumn
{
	background-color:#09F;
	font-family:Arial, Helvetica, sans-serif;
	font-size:15px;
	font-weight:bold;
	color:#FFF;
}

caption.textcolumn
{
color:#999;
text-align:center;
font-size:14px;
}
td.namecolumn
{
	background-color:#09F;
	font-family:Arial, Helvetica, sans-serif;
	font-size:15px;
	font-weight:bold;
	color:#FFF;
}
th.namecolumn
{
	background-color:#09F;
	font-family:Arial, Helvetica, sans-serif;
	font-size:15px;
	font-weight:bold;
	color:#FFF;
}

.textcolumn
{
color:#333;
text-align:left;
font-size:14px;
font-family: Arial, Helvetica, sans-serif;
}
.rowcolumn
{
color:#333;
text-align:left;
border-right:1px #666 solid;
font-size:14px;
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
border-spacing: 0px;
}
</style>

</head>
<body class="oneColLiqCtrHdr">
@if (Session["LogOn"] != null)
{
    <script type="text/javascript">
        $("#IconDangNhap").hide();
        $("#IconDangKy").hide();
    </script>
    if (Session["Role"].Equals("Member"))
    {
<!--Member-->
<div id="floater">
 <table width="100%" border="0">
  <tr>    
    <td width="10%"></td>
    <td width="10%"><a href="@Url.Action("CheckOut","Member")">Thanh toán<li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li></a></td>    
    <td width="10%"><a href=" @Url.Action("ViewCart", "Member") ">Giỏ hàng<li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("VoucherHistory", "Member")">Lịch sử mua hàng<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("Edit", "Member")">@Session["LogOn"]<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("ChangePassword", "Account")">Đổi mật khẩu<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li></a></td>
    <td width="5%"><a href="@Url.Action("LogOut", "Account")">Thoát<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li></a></td>
  </tr>
</table>
</div>
    }
    if (Session["Role"].Equals("Company"))
    {
<!--Company-->
<div id="floater">
 <table width="100%" border="0">
  <tr>
    <td width="10%"><a href="#"></a></td>   
    <td width="15%"><a href="@Url.Action("AddDeal", "Company")">Thêm khuyến mãi<li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li></a></td>
    <td width="15%"><a href="@Url.Action("VoucherManager", "Company")">Quản lý voucher<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("DealHistory", "Company")">Khuyến mãi của tôi<li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("Edit", "Company")">@Session["LogOn"]<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li></a></td>
    <td width="10%"><a href="@Url.Action("ChangePassword", "Account")">Đổi mật khẩu<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li></a></td>
    <td width="5%"><a href="@Url.Action("LogOut", "Account")">Thoát<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li></a></td>
  </tr>
</table>
</div>
    }
    if (Session["Role"].Equals("Admin"))
    {
<!--Admin-->
<div id="floater">
 <table width="100%" border="0">
  <tr>
    <td width="5%"></td>   
    <td width="20%"></td>
    <td width="20%"><a href="@Url.Action("Index", "Home")">Trang chủ<li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li></a></td>
    <td width="30%"><a href="@Url.Action("TKDT_DoanhNghiep", "Admin")">Admin<li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li></a></td>
    <td width="10%"><a href="#">@Session["LogOn"]<li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li></a></td>
    <td width="5%"><a href="@Url.Action("LogOut", "Account")">Thoát<li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li></a></td>
  </tr>
</table>
</div>
    }
<br/>
}
    <div id="container">
        <div id="header">
            <table width="1000" border="0">
                <tr>
                    <td width="267">
                        <img src="@Url.Content("~/Images/icon/Logo.JPG")" alt="" width="267" height="58" />
                    </td>
                    <td width="723">
                        <table width="936" border="0" class="white-text">
                            <tr>
                                <td colspan="3">
                                    <table width="699" border="0" align="left">
                                        <tr>
                                            <td align="right" valign="top" class="style2">
                                                <a href="#">SiteMap</a>
                                            </td>
                                            <td width="221" align="right" valign="top">
                                                <a href="#">Trợ giúp</a>
                                            </td>
                                            <td width="82" align="right" valign="top">
                                                <a href="#">Góp ý</a>
                                            </td>
                                            <td width="94" align="right" valign="top">
                                                <a href="#">Chia sẻ</a>:
                                            </td>
                                            <td width="216">
                                                <img src="@Url.Content("~/Images/icon/fb.JPG")" alt="" width="19" height="19" />
                                                <img src="@Url.Content("~/Images/icon/rss.JPG")" alt="" width="17" height="19" />
                                                <img src="@Url.Content("~/Images/icon/g+.JPG")" alt="" width="19" height="19" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td width="468">                                   
                                    <table width="506" border="0" cellpadding="5" class="white-text">
                                        <tr>
                                            <td>
                                                <input type="hidden" name="dff_view" value="grid" />                                               
                                                <form name="search_cat_bar" method="post" action="@Url.Action("ChangeCity", "Home")">
                                                <select name="dff_cat1num" size="1"  onchange="this.form.submit()">
                                                    <option value="0">Tất cả</option>
                                                    @foreach (var item in cities)
                                                    {
                                                        if (SelectedCityID != item.CityID)
                                                        {
                                                            <option value="@item.CityID">@item.CityName</option>
                                                        }
                                                        else { 
                                                            <option value="@item.CityID" selected="true">@item.CityName</option>
                                                        }
                                                    }
                                                </select> 
                                                </form>                                              
                                            </td>
                                            <td> 
                                                <form name="search_cat_bar" method="post" action="@Url.Action("RegisterEmail", "Home")">
                                                <input type="text" name="dff_keyword" size="30" maxlength="50" />
                                                <input type="hidden" name="dff_cat1num" value="@SelectedCityID"/>
                                                <input type="submit" value="Gửi" />
                                                </form></td>
                                        </tr>
                                    </table>                                    
                                </td>
                                @if (Session["LogOn"] == null)
                                {
                                    <td width="88" align="left" valign="middle">
                                        <a href="@Url.Action("LogOn", "Account")">
                                            <img src="@Url.Content("~/Images/icon/Dangnhap.png")" alt="" width="101" height="25" id="IconDangNhap" /></a>
                                    </td>
                                    <td width="366" align="left" valign="middle">
                                        <a href="@Url.Action("Register", "Account")">
                                            <img src="@Url.Content("~/Images/icon/Dangky.png")" alt="" width="101" height="25" id="IconDangKy"/></a>
                                    </td>
                                }
                                
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div class="ul">
                            <ul>
                                <li>@Html.ActionLink("Tất cả", "Index", "Home")</li>
                                <li>@Html.ActionLink("Du lịch", "PhanLoai/1", "Home")</li>
                                <li>@Html.ActionLink("Ẩm thực", "PhanLoai/2", "Home")</li>
                                <li>@Html.ActionLink("Làm đẹp", "PhanLoai/3", "Home")</li>
                                <li>@Html.ActionLink("Điện máy", "PhanLoai/4", "Home")</li>
                                <li>@Html.ActionLink("Thời trang", "PhanLoai/5", "Home")</li>
                                <li>@Html.ActionLink("Học tập", "PhanLoai/6", "Home")</li>
                                <li>@Html.ActionLink("Sản phẩm", "PhanLoai/7", "Home")</li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
            <!-- end #header -->
        </div>
        <div id="content">
            @RenderBody()
        </div>
        <hr style="color: #FC0; background-color: #FC0; height: 3px" />
        <div id="footer">
            <table width="100%" border="0" class="footer">
                <tr>
                    <td width="25%" height="20">
                        <table width="100%" border="0">
                            <tr>
                                <td>
                                    <a href="#">Điều khoản sử dụng</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#">Hướng dẫn mua hàng</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#">Qui định sử dụng và hoàn trả Voucher</a>
                                </td>
                            </tr>
                            <tr>
                                <td>@Html.ActionLink("Admin", "TKDT_DoanhNghiep", "Admin")
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="15%" align="left">
                        <table width="97%" border="0">
                            <tr>
                                <td>
                                    <a href="#">Liên hệ</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    @Html.ActionLink("Đăng ký doanh nghiệp", "Register", "Company")
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#">Qui chế</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="#">Qui chế</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="55%">
                        <table width="100%" border="0">
                            <tr>
                                <td>
                                    Công Ty TNHH Khuyến Mãi Vàng Văn phòng đại diện : 14A Sông Đà, P.2, Q.Tân Bình,
                                    Tp.HCM Điện thoại : (08)354.727.42 Email : hotro@khuyenmaivang.vn Copyright @@ 2011
                                    Khuyen Mai Vang Co., LTD
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="5%">
                        <img src="@Url.Content("~/Images/icon/hotline.jpg")" alt="" width="209" height="113" />
                    </td>
                </tr>
            </table>
            <!-- end #footer -->
        </div>
        <!-- end #container -->
    </div>
</body>
</html>
